#include "stm32f10x.h"
#include "led.h"
#include "key.h"
#include "delay.h"

int main(void)
{
    LED_Init();
    Key_Init();

    while (1) 
    {
        if (1 == Key_Scan())
        {
            GPIO_WriteBit(LED_PORT, LED_PIN, (BitAction)!GPIO_ReadInputDataBit(LED_PORT, LED_PIN));
        }
    }
}
